<%@ page import="java.net.URLDecoder" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>



<html>
<head>
    <title>书籍列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"rel="stylesheet">
    <script src="${pageContext.request.contextPath}/statics/jquery-3.4.1.min.js"></script>
</head>
<body>
​
<div class="container">
    ​
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>书籍列表 —— 显示所有书籍</small>
                </h1>
                <form action="${pageContext.request.contextPath}/book/queryBookByName" method="get">
                    <input type="text" name="name" id="name" value="n"/>
                    <input type="submit" id="btn04">
                </form>
            </div>
        </div>
    </div>
    ​
    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary"href="${pageContext.request.contextPath}/book/toAddBook">新增</a>
        </div>
    </div>
    ​
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>书籍编号</th>
                    <th>书籍封面</th>
                    <th>书籍名字</th>
                    <th>书籍数量</th>
                    <th>书籍详情</th>
                    <th>操作</th>
                </tr>
                </thead>
                ​
                <tbody>
                <c:forEach var="book" items="${pageInfo.list}">
                    <tr>
                        <td>${book.bookId}</td>
                        <td><img src="${book.bookImg}" alt="${book.bookName}"></td>
                        <td>${book.bookName}</td>
                        <td>${book.bookCounts}</td>
                        <td>${book.detail}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/book/toUpdateBook?id=${book.bookId}">更改</a> |
                            <a href="${pageContext.request.contextPath}/book/deletePaper?id=${book.bookId}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>

            </table>
        </div>
    </div>
</div>



</div>

</div>
</body>
</html>